package com.ruoyi.platform.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.platform.mapper.TbInstitutionMapper;
import com.ruoyi.platform.domain.TbInstitution;
import com.ruoyi.platform.service.ITbInstitutionService;

/**
 * 机构信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
@Service
public class TbInstitutionServiceImpl implements ITbInstitutionService 
{
    @Autowired
    private TbInstitutionMapper tbInstitutionMapper;

    /**
     * 查询机构信息
     * 
     * @param serviceInstitutionId 机构信息主键
     * @return 机构信息
     */
    @Override
    public TbInstitution selectTbInstitutionByServiceInstitutionId(Long serviceInstitutionId)
    {
        return tbInstitutionMapper.selectTbInstitutionByServiceInstitutionId(serviceInstitutionId);
    }

    /**
     * 查询机构信息列表
     * 
     * @param tbInstitution 机构信息
     * @return 机构信息
     */
    @Override
    public List<TbInstitution> selectTbInstitutionList(TbInstitution tbInstitution)
    {
        return tbInstitutionMapper.selectTbInstitutionList(tbInstitution);
    }

    /**
     * 新增机构信息
     * 
     * @param tbInstitution 机构信息
     * @return 结果
     */
    @Override
    public int insertTbInstitution(TbInstitution tbInstitution)
    {
        return tbInstitutionMapper.insertTbInstitution(tbInstitution);
    }

    /**
     * 修改机构信息
     * 
     * @param tbInstitution 机构信息
     * @return 结果
     */
    @Override
    public int updateTbInstitution(TbInstitution tbInstitution)
    {
        return tbInstitutionMapper.updateTbInstitution(tbInstitution);
    }

    /**
     * 批量删除机构信息
     * 
     * @param serviceInstitutionIds 需要删除的机构信息主键
     * @return 结果
     */
    @Override
    public int deleteTbInstitutionByServiceInstitutionIds(Long[] serviceInstitutionIds)
    {
        return tbInstitutionMapper.deleteTbInstitutionByServiceInstitutionIds(serviceInstitutionIds);
    }

    /**
     * 删除机构信息信息
     * 
     * @param serviceInstitutionId 机构信息主键
     * @return 结果
     */
    @Override
    public int deleteTbInstitutionByServiceInstitutionId(Long serviceInstitutionId)
    {
        return tbInstitutionMapper.deleteTbInstitutionByServiceInstitutionId(serviceInstitutionId);
    }
}
